package com.paiai.lslease.service.landlordauth;

import com.paiai.lslease.auto.model.AppLandlordAuth;
import com.paiai.lslease.auto.model.AppSysUser;
import com.paiai.lslease.model.AppLandlordAuthHouseInfo;

import java.util.List;

public interface AppLandlordAuthService {
    /**
     * 房东授权房源列表给用户
     */
    List<AppLandlordAuthHouseInfo> insertAppLandlordAuthList(List<AppLandlordAuth> appLandlordAuthList) throws Exception;

    /**
     * 根据授权房源关联ID查询关联信息
     */
    AppLandlordAuth selectAppLandlordAuth(int landlordAuthId) throws Exception;

    /**
     * 查询房东授权给用户的房源列表信息
     */
    List<AppLandlordAuthHouseInfo> selectAppLandlordAuthListByLandlordId(String landlordId) throws Exception;

    /**
     * 查询用户被授权的房源列表信息，根据手机号码检索
     */
    List<AppLandlordAuthHouseInfo> selectAppLandlordAuthListByUserMobile(String userMobile) throws Exception;

    /**
     * 查询用户被授权的房源列表信息，根据用户ID检索
     */
    List<AppLandlordAuthHouseInfo> selectAppLandlordAuthListByUserId(int userId) throws Exception;

    /**
     * 查询用户是否有被授权的房源
     */
    boolean userHasAuthedHouse(String userMobile, int houseId) throws Exception;

    /**
     * 删除用户被授权的房源
     */
    boolean deleteAuthedHouse(String userMobile, int houseId) throws Exception;

    /**
     * 房东删除授权给用户的一个房源信息
     */
    boolean deleteAppLandlordAuth(int appLandlordAuthId) throws Exception;

    /**
     * 查询房东授权的所有管理员
     */
    List<AppSysUser> queryAllAuthedManager(int landlordId) throws Exception;

    /**
     * 根据被授权用户手机号码查询授权关联信息
     */
    List<AppLandlordAuth> queryAppLandlordAuthListByUserMobile(String userMobile) throws Exception;

    /**
     * 房东删除已授权的管理员
     */
    boolean deleteAuthedManager(String userMobile) throws Exception;
}
